export default {
  install (Vue, options) {
    Vue.prototype.$generateArray = function () {
      let nameArr = ["困在时间里的父亲", "觉醒年代", "东城梦魇", "杀死伊芙", "时光代理人", "山河令", "庆余年", "窥探", "无罪之最", "咒术回战"];
      let filmDesc = "电影票房比较火爆，常年位于豆瓣榜TOP20";
      console.log('使用全局自定义方法GenerateArray');
      let res = [];
      for(let i = 0; i < 100; i++){
        let filmInfo = {
          name: nameArr[Math.floor((Math.random()*nameArr.length))],
          desc: filmDesc,
          score: Math.floor((Math.random()*5)) + 1,
          status: false
        }
        res.push(filmInfo);
      }
      return res;
    }
  }
}
